$OpenBSD: patch-configure_ac,v 1.5 2016/04/20 18:38:41 robert Exp $
--- configure.ac.orig	Wed Apr 20 20:00:21 2016
+++ configure.ac	Wed Apr 20 20:02:22 2016
@@ -52,7 +52,7 @@ AC_CANONICAL_HOST
 BUILDOS=""
 case "$host_os" in
 	openbsd*)
-		BUILDOS="-DOPENBSD"
+		BUILDOS="-DOPENBSD -DLINUX"
 		;;
 	linux*)
 		BUILDOS="-DLINUX"
@@ -133,7 +133,8 @@ AC_ARG_WITH([distro], AS_HELP_STRING([--with-distro], 
   [with_distro=${withval}],[with_distro=rhel])
 if test "$with_distro" != "rhel" -a "$with_distro" != "suse" -a \
    "$with_distro" != "sles" -a "$with_distro" != "alt" -a \
-   "$with_distro" != "cbs4" -a "$with_distro" != "debian"; then
+   "$with_distro" != "cbs4" -a "$with_distro" != "debian" -a \
+   "$with_distro" != "openbsd"; then
 	AC_MSG_ERROR([unknown distro])
 else
 	AC_MSG_RESULT([using $with_distro])
@@ -740,6 +741,8 @@ ZCPPFLAGS="$ZCPPFLAGS $icu_uc_CFLAGS $icu_i18n_CFLAGS"
 # all libs for programs, because functions are in static common stuff
 PROG_LIBS="$UUID_LIBS $INTL_LIBS $ICONV_LIBS $GZ_LIBS"
 AC_SUBST(PROG_LIBS)
+
+AC_CHECK_FUNCS([arc4random_buf])
 
 # done testing C++ requirements
 AC_LANG_POP
